#!/usr/bin/perl
#createmod.cgi

require './mirrorman-lib.pl';
&ReadParse();
&header($text{'createtitle'}, "" , "index", 0, 1,);

print "<form name='crmod' action=creating.cgi method=post onsubmit='on_form_sbumit()'>\n";
print "<table class=mode1 width=80%>\n";
print "<tr><td width=150>$text{'modname'}</td><td><input type=text name=modname class=text></td></tr>\n";
print "<tr><td width=150>$text{'modpath'}</td><td><input type=text name=modpath class=text></td></tr>\n";
print "<tr><td width=150>$text{'modcomment'}</td><td><input type=text name=modcomment class=text></td></tr>\n";


print "</table>\n";

print "<table border=0 class=mode1><tr><td>\n";
print "<input type=submit name=modify value=\"$text{'bt_create'}\" class=button1 onclick='return on_create_click();'>\n";
print "<input type=submit name=cancle value=\"$text{'bt_cancel'}\" class=button1 onclick='return on_cancle_click()'>\n";
print "</td></tr></table>\n";
print <<EOF;
<script>
function on_create_click()
{   
    if(document.crmod.modname.value == "")
    {
       alert("$text{'mesg_no_modname'}");
       return false;      
    }
    if(document.crmod.modpath.value == "")
    {
       alert("$text{'mesg_no_modpath'}");
       return false;
    }

}

function on_cancle_click()
{
    document.crmod.action = "cancle.cgi";
}
</script>
EOF
&footer("/", $text{'index'});
